<?php
require_once 'init.php';
if(!$sessionID){
	header('location:login.php');
}
$targetFolder = '/uploads';
if (!empty($_FILES)) {
	$width = isset($_POST['width'])?$_POST['width']:0;
	$height = isset($_POST['height'])?$_POST['height']:0;
	$img = new Img($_FILES['Filedata'],$width,$height);
	$re = $img->saveUpload();
	echo $re;
}
?>
